using Boo.Lang;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityScript.Lang;

[Serializable]
public class localtournament : MonoBehaviour
{
	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024OnLevelWasLoaded_0024394 : GenericGenerator<WaitForSeconds>
	{
		internal localtournament _0024self__0024397;

		public _0024OnLevelWasLoaded_0024394(localtournament self_)
		{
			_0024self__0024397 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024397);
		}
	}

	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024del_0024398 : GenericGenerator<WaitForSeconds>
	{
		internal localtournament _0024self__0024400;

		public _0024del_0024398(localtournament self_)
		{
			_0024self__0024400 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024400);
		}
	}

	public string baselevel;

	public GameObject set1b;

	public GameObject set2b;

	public GameObject set3b;

	public GameObject set22b;

	public string opponent;

	public string opponent2;

	public string opponent3;

	public int randomizer;

	public int played;

	public bool won;

	public GameObject[] arenas;

	public GameObject bronze;

	public GameObject silver;

	public GameObject gold;

	private GameObject[] tops;

	public bool roundplaying;

	[NonSerialized]
	public static int arena;

	public int state;

	public career13d tmp;

	public string nextcareer;

	public string previouscareer;

	public localtournament()
	{
		baselevel = string.Empty;
		opponent = string.Empty;
		opponent2 = string.Empty;
		opponent3 = string.Empty;
		tops = new GameObject[8];
		nextcareer = string.Empty;
		previouscareer = string.Empty;
	}

	public void Awake()
	{
		UnityEngine.Object.DontDestroyOnLoad(gameObject);
		if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "career")
		{
			nextcareer = "career2";
			previouscareer = "career3";
		}
		if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "career3")
		{
			nextcareer = "career4";
			previouscareer = "career2";
		}
	}

	public IEnumerator OnLevelWasLoaded()
	{
		return new _0024OnLevelWasLoaded_0024394(this).GetEnumerator();
	}

	public IEnumerator del()
	{
		return new _0024del_0024398(this).GetEnumerator();
	}

	public void roundplay()
	{
		roundplaying = true;
	}

	public void stadiumload()
	{
		if (!roundplaying)
		{
			arena = UnityEngine.Random.Range(0, Extensions.get_length((System.Array)arenas));
			roundplay();
			state = 1;
		}
		arenas[arena].SetActive(value: true);
		for (int i = 0; i < arenas[arena].transform.childCount; i++)
		{
			arenas[arena].transform.GetChild(i).gameObject.SetActive(value: true);
		}
	}

	public void Main()
	{
	}
}
